package com.ziyueyuwen.xiniao.service;

import com.ziyueyuwen.xiniao.bean.ZyUser;
import com.ziyueyuwen.xiniao.bean.vo.ZyUserVO;
import com.ziyueyuwen.xiniao.bean.page.PageData;
import com.ziyueyuwen.xiniao.enums.StudentQueryEnum;

import java.util.List;

/**
 * @author wancheng  on 2018/12/17.
 */
public interface UserService {
    /**
     * 获取用户信息
     * @param userAccount
     * @return
     */
    ZyUserVO getUserMessage(String userAccount);

    /**
     * 获取所有学生
     * @return
     */
    List<ZyUser> getAllStudent();

    /**
     * 获取用户
     * @param account
     * @return
     */
    ZyUser getByAccount(String account);

    /**
     * 学生筛选
     * @param queryType
     * @param queryValue
     * @param ifBindWx
     * @param page
     * @param rows
     * @return
     */
    PageData<ZyUserVO> getAllStudent(StudentQueryEnum queryType,String queryValue,Boolean ifBindWx, Integer page, Integer rows);

    /**
     * 添加学生
     * @param student
     * @return
     * @throws Exception
     */
    ZyUser saveStudent(ZyUser student) throws Exception;

    /**
     * 添加老师
     * @param teacher
     * @return
     * @throws Exception
     */
    ZyUser saveTeacher(ZyUser teacher) throws Exception;

    /**
     * 修改学生姓名
     * @param student
     */
    void updateStudentName(ZyUser student) throws Exception;

    /**
     * 获取所有学生
     * @return
     */
    List<ZyUser> getStudents();

    /**
     * 获取所有老师
     * @return
     */
    List<ZyUser> getTeachers();

    /**
     * 获取学生
     * @param classId
     * @return
     */
    List<ZyUser> getStudents(Integer classId);

    /**
     * 获取学生
     * @param lessonId
     * @return
     */
    List<ZyUser> getStudentsByLessonId(Integer lessonId);

    /**
     * 获取学生
     * @param lessonId
     * @return
     */
    List<ZyUser> getTransferStudent(Integer lessonId);

    /**
     * 获取学生
     * @param dingTalkId
     * @return
     */
    ZyUser getUserByDingTalkId(String dingTalkId);

    /**
     * 获取系统用户
     * @param query
     * @param page
     * @param rows
     * @return
     */
    PageData<ZyUserVO> getSysUser(String query,Integer page,Integer rows);

    /**
     * 获取学生
     * @param wxUserId
     * @return
     */
    ZyUser getByWxUserId(String wxUserId);

    /**
     * 通过手机号或 姓名模糊搜索
     * @param query
     * @return
     */
    List<ZyUser> getStudentByAccountOrName(String query);

    /**
     * 通过uid获取
     * @param uId
     * @return
     */
    ZyUser getUserByUid(String uId);
}
